﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using HitachiLib.HitachiServiceRef;

namespace HitachiLib.Data
{
    public class Resource
    {
        ResourceData data;

        private static Dictionary<int, Resource> s_map = new Dictionary<int,Resource>();

        public static Resource GetUnique(ResourceData rd)
        {
            if (s_map.ContainsKey(rd.ID))
            {
                return s_map[rd.ID];
            }
            Resource r = new Resource();
            r.data = rd;
            s_map.Add(rd.ID, r);
            return r;
        }

        public ResourceData Data
        {
            get { return data; }
        }
    }
}
